package cn.com.css.taxInspection.attention.controller;

import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Api(tags = "服务端口视图")
@Controller
@RequestMapping("/index/attention")
public class IndexAttentionController {

    //关注案件
    @GetMapping("/attentionCase")
    public String attentionCase(Model model) {
        return "attention/attentionCase";
    }

    //关注案件-专项案件管理（ADD,UPDATE,DELETE,LOOK CASE）
    @GetMapping("/specialCaseManagement")
    public String specialCaseManagement(Model model) {
        return "attention/specialCaseManagement";
    }

    //关注收入
    @GetMapping("/attentionIncome")
    public String attentionIncome(Model model) {
        return "attention/attentionIncome";
    }

    //检举案件
    @GetMapping("/jjaj")
    public String jjaj(Model model) {
        return "attention/jjaj";
    }

    //关注查补
    @GetMapping("/attentionCheckAndSupplement")
    public String attentionCheckAndSupplement(Model model) {
        return "attention/attentionCheckAndSupplement";
    }

    //案件管理-案件预警
    @GetMapping("/cqyj")
    public ModelAndView cqyj(@RequestParam(required = false, value = "dayType") String dayType) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("attention/cqyj");
        mv.addObject("dayType", StringUtils.isEmpty(dayType) ? "0" : dayType);
        return mv;
    }

    //案件管理-调查核实
    @GetMapping("/dchs")
    public String dchs(Model model) {
        return "attention/dchs";
    }

    //案件管理-积案情况
    @GetMapping("/jaqk")
    public ModelAndView jaqk(@RequestParam(required = false, value = "swjgmc") String swjgmc, @RequestParam(required = false, value = "ajztDm") String ajztDm) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("attention/jaqk");
        String swjgdm = "12101009100";
        String ajztDmTmp = "0";
        if (!StringUtils.isEmpty(swjgmc)) {
            if ("五科".equals(swjgmc.trim())) {
                swjgdm = "12101009145";
            } else if ("四科".equals(swjgmc.trim())) {
                swjgdm = "12101009144";
            } else if ("三科".equals(swjgmc.trim())) {
                swjgdm = "12101009143";
            } else if ("二科".equals(swjgmc.trim())) {
                swjgdm = "12101009142";
            } else if ("一科".equals(swjgmc.trim())) {
                swjgdm = "12101009141";
            }
        }
        if (!StringUtils.isEmpty(ajztDm)) {
            if ("在查".equals(ajztDm.trim())) {
                ajztDmTmp = "2";
            } else if ("在审".equals(ajztDm.trim())) {
                ajztDmTmp = "3";
            } else if ("在执行".equals(ajztDm.trim())) {
                ajztDmTmp = "4";
            } else if ("办结".equals(ajztDm.trim())) {
                ajztDmTmp = "901";
            } else if ("结案".equals(ajztDm.trim())) {
                ajztDmTmp = "5";
            }
        }
        mv.addObject("swjgDm", swjgdm);
        mv.addObject("ajztDm", ajztDmTmp);
        return mv;
    }

    //案件管理-案件查询(全局)
    @GetMapping("/ajcx")
    public String ajcx() {
        return "attention/ajcx";
    }

    //案件管理-案件查询(全市)
    @GetMapping("/ajcxqs")
    public String ajcxqs() {
        return "attention/ajcxqs";
    }

    //案件管理-双打报表（全市）
    @GetMapping("/sdbbqs")
    public String sdbbqs() {
        return "attention/sdbbqs";
    }

    //案件管理-双打报表（全局）
    @GetMapping("/sdbbqj")
    public String sdbbqj() {
        return "attention/sdbbqj";
    }

    //案件管理-案件维护
    @GetMapping("/ajwh")
    public String ajwh() {
        return "attention/ajwh";
    }

    //案件管理-双打案源类型字典
    @GetMapping("/sdaylxzd")
    public String sdaylxzd() {
        return "attention/sdaylxzd";
    }

    //关注-积案管理
    @GetMapping("/backlogCaseManagement")
    public String backlogCaseManagement(Model model) {
        return "attention/backlogCaseManagement";
    }

    //关注-一类积案
    @GetMapping("/firstClassBacklogCase")
    public ModelAndView firstClassBacklogCase(@RequestParam(required = false, value = "ajztDm") String ajztDm,
                                              @RequestParam(required = false, value = "swjgDm") String swjgDm) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("attention/firstClassBacklogCase");
        mv.addObject("ajztDm", StringUtils.isEmpty(ajztDm) ? "0" : ajztDm);
        mv.addObject("swjgDm", StringUtils.isEmpty(swjgDm) ? "0" : swjgDm);
        return mv;
    }

    //关注-二类积案
    @GetMapping("/secondClassBacklogCase")
    public ModelAndView secondClassBacklogCase(@RequestParam(required = false, value = "ajztDm") String ajztDm,
                                               @RequestParam(required = false, value = "swjgDm") String swjgDm) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("attention/secondClassBacklogCase");
        mv.addObject("ajztDm", StringUtils.isEmpty(ajztDm) ? "0" : ajztDm);
        mv.addObject("swjgDm", StringUtils.isEmpty(swjgDm) ? "0" : swjgDm);
        return mv;
    }

    //选案指标
    @GetMapping("/xazb")
    public ModelAndView xazb(@RequestParam(required = false, value = "xafaId") String xafaId) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("attention/zbxa");
        mv.addObject("xafaId", StringUtils.isEmpty(xafaId) ? "0" : xafaId);
        return mv;
    }

    //选案指标
    @GetMapping("/zbxansrcx")
    public String zbxansrcx(Model model) {
        return "attention/zbxansrcx";
    }

    //已上解未入库
    @GetMapping("/ysjwrk")
    public String ysjwrk(Model model) {
        return "attention/ysjwrk";
    }

    //重点行业字典
    @GetMapping("/zbxazdhyzd")
    public String zbxazdhyzd(Model model) {
        return "attention/zbxazdhyzd";
    }

    //选案方案
    @GetMapping("/zbxaxafa")
    public String zbxaxafa(Model model) {
        return "attention/zbxaxafa";
    }

    //选案方案审批
    @GetMapping("/zbxaxafasp")
    public String zbxaxafasp(Model model) {
        return "attention/zbxaxafasp";
    }

    //积案数据清除，案件状态变化数据 案件预计完成时间表
    @GetMapping("/jasjqc")
    public String jasjqc(Model model) {
        return "attention/jasjqc";
    }

    //积案案件预计清理时间
    @GetMapping("/jayjqlsj")
    public String jayjqlsj(Model model) {
        return "attention/jayjqlsj";
    }


    //积案生成任务配置
    @GetMapping("/jianscrwpz")
    public String jianscrwpz(Model model) {
        return "attention/jianscrwpz";
    }

    //积案形成原因
    @GetMapping("/jianxcyy")
    public String jianxcyy(Model model) {
        return "attention/jianxcyy";
    }

    //积案定期汇报
    @GetMapping("/jiandqhb")
    public String jiandqhb(Model model) {
        return "attention/jiandqhb";
    }

    //积案案件明细表
    @GetMapping("/jianajmxb")
    public String jianajmxb(Model model) {
        return "attention/jianajmxb";
    }

    //积案案件耗时表
    @GetMapping("/jianajhsb")
    public String jianajhsb(Model model) {
        return "attention/jianajhsb";
    }

    //智能建表
    @GetMapping("/jtjb")
    public String jtjb(Model model) {
        return "attention/jtjb";
    }

    //指标查询
    @GetMapping("/zbcx")
    public String zbcx(Model model) {
        return "attention/zbcx";
    }

    //稽查工作成果表
    @GetMapping("/jcgzcgb")
    public String jcgzcgb(Model model) {
        return "attention/jcgzcgb";
    }

    //收入统计-区域-税种
    @GetMapping("/srtjqysz")
    public String srtjqysz(Model model) {
        return "attention/srtjqysz";
    }

    //收入统计-区域-类型
    @GetMapping("/srtjqylx")
    public String srtjqylx(Model model) {
        return "attention/srtjqylx";
    }

    //预计收入
    @GetMapping("/yjsr")
    public String yjsr(Model model) {
        return "attention/yjsr";
    }

    //收入自行申报
    @GetMapping("/srzxsb")
    public String srzxsb(Model model) {
        return "attention/srzxsb";
    }

    //处理决定书清册
    @GetMapping("/cljdsqc")
    public String cljdsqc(Model model) {
        return "attention/cljdsqc";
    }

    //处罚决定书清册
    @GetMapping("/cfjdsqc")
    public String cfjdsqc(Model model) {
        return "attention/cfjdsqc";
    }

    //检查通知书清册
    @GetMapping("/jctzsqc")
    public String jctzsqc(Model model) {
        return "attention/jctzsqc";
    }

}
